Skip to content

Conversation

@gamazeps
Copy link
Contributor

Closes #18218

@huonw
Copy link
Contributor

huonw commented Oct 24, 2014

I think this phrasing is better, but the first part of the sentence is still too active: take does not "get the first n elements" out of the iterator, it returns the old iterator, cutting off the stream after n items have been yielded. In particular, it doesn't touch next or consume anything until next is called: let _ = iter.take(n); does no iteration or mutation.

@steveklabnik
Copy link
Contributor

@huonw 👍

@gamazeps
Copy link
Contributor Author

@huonw better ?

src/doc/guide.md Outdated
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

give away?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

right, return is better :p

@gamazeps
Copy link
Contributor Author

@steveklabnik better ?

@gamazeps
Copy link
Contributor Author

r?

@steveklabnik
Copy link
Contributor

Thanks. Editing is the worst, sorry there was so much churn over such a small change.

bors added a commit that referenced this pull request Oct 28, 2014
@gamazeps
Copy link
Contributor Author

@steveklabnik No problem :)
It didn't take that long (writting and waiting for review is asynchronous :p ) anyway.

If you want a hand on more edits in the doc I'm here :)

@bors bors closed this Oct 28, 2014
@bors bors merged commit b4697f0 into rust-lang:master Oct 28, 2014
@gamazeps gamazeps deleted the issue18218 branch May 7, 2017 14:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

rust guide: take() confusingly described as returning a list

4 participants